package com.c6906.vdam.dps.request;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("分页实体类")
public class PageRequest {

    private static final int DEFAULT_PAGENUM = 1;

    private static final int DEFAULT_PAGESIZE = 10;

    @ApiModelProperty(value = "页码")
    private int pageNum;

    @ApiModelProperty(value = "每页数量")
    private int pageSize;

    public int getPageNum() {
        return this.pageNum;
    }

    public void setPageNum(int pageNum) {
        if (pageNum > 0)
            this.pageNum = pageNum;
        else
            this.pageNum = DEFAULT_PAGENUM;
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(int pageSize) {
        if (pageSize > 0)
            this.pageSize = pageSize;
        else
            this.pageSize = DEFAULT_PAGESIZE;
    }
}